package com.wicket.okrframework.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrframework.base.service.dto.req.*;
import com.wicket.okrframework.biz.service.dto.req.*;
import com.wicket.okrframework.biz.service.dto.res.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import com.wicket.okrframework.common.util.CommonFunctionHelper;
import com.wicket.okrframework.common.util.RedisUtil;
import com.wicket.okrframework.common.exception.BizException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

import java.util.List;
import java.util.stream.Collectors;
import com.wicket.okrframework.base.service.MInductionRecordService;
import com.wicket.okrframework.common.exception.Assert;
import com.wicket.okrframework.dal.po.mbg.InductionRecord;
import com.wicket.okrframework.base.service.MUsersService;
import com.wicket.okrframework.base.service.MUserinfoService;
import com.wicket.okrframework.dal.po.mbg.Userinfo;
import com.wicket.okrframework.base.service.MSpaceMemberService;
import com.wicket.okrframework.dal.po.mbg.SpaceMember;
import com.wicket.okrframework.base.service.MOriginalRoleMemberService;
import com.wicket.okrframework.dal.po.mbg.OriginalRoleMember;
import com.wicket.okrframework.base.service.MOriginalRoleMemberInfoService;
import com.wicket.okrframework.dal.po.mbg.OriginalRoleMemberInfo;
import com.wicket.okrframework.base.service.MRoleMemberService;
import com.wicket.okrframework.dal.po.mbg.RoleMember;

import java.util.ArrayList;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrframework.base.service.MSpaceService;
import com.wicket.okrframework.base.service.MOrganizationService;
import com.wicket.okrframework.base.service.MUnionAppService;
import com.wicket.okrframework.base.service.MStatusCheckItemService;
import com.wicket.okrframework.base.service.MPrivacyDistributionService;
import com.wicket.okrframework.dal.po.mbg.Users;
import com.wicket.okrframework.dal.po.mbg.Organization;
import com.wicket.okrframework.dal.po.mbg.UnionApp;
import com.wicket.okrframework.dal.po.mbg.StatusCheckItem;
import com.wicket.okrframework.dal.po.mbg.PrivacyDistribution;
import com.wicket.okrframework.base.service.MStaffingAccountService;
import com.wicket.okrframework.base.service.MStaffingService;
import com.wicket.okrframework.base.service.MTypeDictionaryService;
import com.wicket.okrframework.base.service.MDeptService;
import com.wicket.okrframework.base.service.MDeptPositionRelationshipService;
import com.wicket.okrframework.base.service.MDutyTargetDetailService;
import com.wicket.okrframework.base.service.MPostService;
import com.wicket.okrframework.base.service.MStationService;
import com.wicket.okrframework.base.service.MStationTypeService;
import com.wicket.okrframework.base.service.MPositionIdNameService;
import com.wicket.okrframework.base.service.MPositionService;
import com.wicket.okrframework.base.service.MPositionGradeService;
import com.wicket.okrframework.base.service.MGradeScopeService;
import com.wicket.okrframework.base.service.MUsersUnionService;
import com.wicket.okrframework.dal.po.mbg.StaffingAccount;
import com.wicket.okrframework.dal.po.mbg.Staffing;
import com.wicket.okrframework.dal.po.mbg.TypeDictionary;
import com.wicket.okrframework.dal.po.mbg.Dept;
import com.wicket.okrframework.dal.po.mbg.DeptPositionRelationship;
import com.wicket.okrframework.dal.po.mbg.DutyTargetDetail;
import com.wicket.okrframework.dal.po.mbg.Post;
import com.wicket.okrframework.dal.po.mbg.Station;
import com.wicket.okrframework.dal.po.mbg.StationType;
import com.wicket.okrframework.dal.po.mbg.PositionIdName;
import com.wicket.okrframework.dal.po.mbg.Position;
import com.wicket.okrframework.dal.po.mbg.PositionGrade;
import com.wicket.okrframework.dal.po.mbg.GradeScope;
import com.wicket.okrframework.dal.po.mbg.UsersUnion;
import com.wicket.okrcomponent.integration.dto.DeleteSpaceSchemeRecordEtcComRespDto;
import com.wicket.okrcomponent.integration.dto.DeleteSpaceSchemeRecordEtcComReqDto;
import com.wicket.okrcomponent.integration.FwCompSystemTestDomainClient;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class SystemTestDomainServiceImpl implements com.wicket.okrframework.biz.service.SystemTestDomainService {
    @Resource
    private RedisUtil redisUtil;
@Resource
  private MInductionRecordService mInductionRecordService;
@Resource
  private MUsersService mUsersService;
@Resource
  private MUserinfoService mUserinfoService;
@Resource
  private MSpaceMemberService mSpaceMemberService;
@Resource
  private MOriginalRoleMemberService mOriginalRoleMemberService;
@Resource
  private MOriginalRoleMemberInfoService mOriginalRoleMemberInfoService;
@Resource
  private MRoleMemberService mRoleMemberService;
@Resource
  private MSpaceService mSpaceService;
@Resource
  private MOrganizationService mOrganizationService;
@Resource
  private MUnionAppService mUnionAppService;
@Resource
  private MStatusCheckItemService mStatusCheckItemService;
@Resource
  private MPrivacyDistributionService mPrivacyDistributionService;
@Resource
  private MStaffingAccountService mStaffingAccountService;
@Resource
  private MStaffingService mStaffingService;
@Resource
  private MTypeDictionaryService mTypeDictionaryService;
@Resource
  private MDeptService mDeptService;
@Resource
  private MDeptPositionRelationshipService mDeptPositionRelationshipService;
@Resource
  private MDutyTargetDetailService mDutyTargetDetailService;
@Resource
  private MPostService mPostService;
@Resource
  private MStationService mStationService;
@Resource
  private MStationTypeService mStationTypeService;
@Resource
  private MPositionIdNameService mPositionIdNameService;
@Resource
  private MPositionService mPositionService;
@Resource
  private MPositionGradeService mPositionGradeService;
@Resource
  private MGradeScopeService mGradeScopeService;
@Resource
  private MUsersUnionService mUsersUnionService;
@Resource
  private FwCompSystemTestDomainClient fwCompSystemTestDomainClient;
/**
   * D1-3-13查询单条就职记录详情(公共)[4306]
   * gen by moon at 4/7/2024, 8:41:12 AM
   */
  @Trace(operationName = "D1-3-13查询单条就职记录详情(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QuerySingleInductionRecordIdDetailComRespDto querySingleInductionRecordIdDetailCom(QuerySingleInductionRecordIdDetailComReqDto reqDto){
    
      
      InductionRecord inductionRecord_1 =null;
//步骤0: M1-3-13查询单条就职记录详情 - querySingleInductionRecordIdDetail
     InductionRecord inductionRecord = null;
    QuerySingleInductionRecordIdDetailReq querySingleInductionRecordIdDetailReq=new QuerySingleInductionRecordIdDetailReq();
  if(reqDto!=null){
      querySingleInductionRecordIdDetailReq.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:280570_1
querySingleInductionRecordIdDetailReq.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:1414850_1
    }
  
    /*M1-3-13查询单条就职记录详情[4278]   */
    Assert.isNull(querySingleInductionRecordIdDetailReq.getInductionRecordId(),"D1-3-13查询单条就职记录详情(公共)-M1-3-13查询单条就职记录详情-就职记录ID不能为空",false);
      inductionRecord = mInductionRecordService.querySingleInductionRecordIdDetail(querySingleInductionRecordIdDetailReq)/*vcase invoke 本地 method 方法调用;*/;
      
      
      inductionRecord_1 = inductionRecord;
    
QuerySingleInductionRecordIdDetailComRespDto retData = new QuerySingleInductionRecordIdDetailComRespDto();
  if(inductionRecord_1!=null){
      retData.setInductionRecordId(inductionRecord_1.getInductionRecordId());//SimpleFieldAssign//sourceId:280576_1
retData.setOriginalRoleMemberId(inductionRecord_1.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:280577_1
retData.setUserId(inductionRecord_1.getUserId());//SimpleFieldAssign//sourceId:280578_1
retData.setFirstLetter(inductionRecord_1.getFirstLetter());//SimpleFieldAssign//sourceId:280579_1
retData.setInductionStartTime(inductionRecord_1.getInductionStartTime());//SimpleFieldAssign//sourceId:301516_1
retData.setInductionEndTime(inductionRecord_1.getInductionEndTime());//SimpleFieldAssign//sourceId:301517_1
retData.setEntityId(inductionRecord_1.getEntityId());//SimpleFieldAssign//sourceId:1707402_1
    }
  

  
  
return retData;
  }
/**
   * D1批量删个人账号测试[4868]
   * gen by moon at 10/16/2022, 11:10:13 AM
   */
  @Trace(operationName = "D1批量删个人账号测试")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchDeleteUserTestDataRespDto batchDeleteUserTestData(BatchDeleteUserTestDataReqDto reqDto){
    
      
      //步骤0: M1批量删个人账号测试 - batchDeleteUserTestData
     boolean bOOLEAN ;
    List<String> listString=new ArrayList<>();
  if(reqDto!=null){
      listString=reqDto.getUserTestDataList();;//list-field-assign//sourceId:380669_1
    }
  
    /*M1批量删个人账号测试[4856]   */
    
      bOOLEAN = mUsersService.batchDeleteUserTestData(listString);
      
      
      
    
//步骤1: M1批量查询个人资料测试 - batchQueryUserInfoTestData
     List<Userinfo> listUserinfo =new ArrayList<>();
    BatchQueryUserInfoTestDataReq batchQueryUserInfoTestDataReq=new BatchQueryUserInfoTestDataReq();
  if(reqDto!=null){
      batchQueryUserInfoTestDataReq.setUserInfoTestDataList(reqDto.getUserTestDataList());//list-field-assign//sourceId:380672_1
    }
  
    /*M1批量查询个人资料测试[4858]   */
    
      listUserinfo = mUserinfoService.batchQueryUserInfoTestData(batchQueryUserInfoTestDataReq);
      
      
      
    
//步骤2: M1批量删个人资料测试 - batchDeleteUserInfoTestData
     boolean bOOLEAN_1 ;
    if(listUserinfo !=null&& !CollectionUtil.isEmpty(listUserinfo)&& listUserinfo.size()>0 ){
          List<String> listString_1=new ArrayList<>();
  listString_1 = listUserinfo.stream().map(item->item.getPersonalDataId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380676_1
  
    /*M1批量删个人资料测试[4857]   */
    
      bOOLEAN_1 = mUserinfoService.batchDeleteUserInfoTestData(listString_1);
      
      
      
           }
    
//步骤3: M1批量查询空间成员测试 - batchQueryMemberTestData
     List<SpaceMember> listSpaceMember =new ArrayList<>();
    BatchQueryMemberTestDataReq batchQueryMemberTestDataReq=new BatchQueryMemberTestDataReq();
  if(reqDto!=null){
      batchQueryMemberTestDataReq.setMemberTestDataList(reqDto.getUserTestDataList());//list-field-assign//sourceId:380679_1
    }
  
    /*M1批量查询空间成员测试[4859]   */
    
      listSpaceMember = mSpaceMemberService.batchQueryMemberTestData(batchQueryMemberTestDataReq);
      
      
      
    
//步骤4: M1批量删空间成员测试 - batchDeleteMemberTestData
     boolean bOOLEAN_2 ;
    if(listSpaceMember !=null&& !CollectionUtil.isEmpty(listSpaceMember)&& listSpaceMember.size()>0 ){
          List<String> listString_2=new ArrayList<>();
  listString_2 = listSpaceMember.stream().map(item->item.getMemberId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380682_1
  
    /*M1批量删空间成员测试[4860]   */
    
      bOOLEAN_2 = mSpaceMemberService.batchDeleteMemberTestData(listString_2);
      
      
      
           }
    
//步骤5: M1批量查询身份人员测试 - batchQueryOriginalRoleMemberTestData
     List<OriginalRoleMember> listOriginalRoleMember =new ArrayList<>();
    BatchQueryOriginalRoleMemberTestDataReq batchQueryOriginalRoleMemberTestDataReq=new BatchQueryOriginalRoleMemberTestDataReq();
  if(reqDto!=null){
      batchQueryOriginalRoleMemberTestDataReq.setOriginalRoleMemberTestDataList(reqDto.getUserTestDataList());//list-field-assign//sourceId:380685_1
    }
  
    /*M1批量查询身份人员测试[4861]   */
    
      listOriginalRoleMember = mOriginalRoleMemberService.batchQueryOriginalRoleMemberTestData(batchQueryOriginalRoleMemberTestDataReq);
      
      
      
    
//步骤6: M1批量删身份人员测试 - batchDeleteOriginalRoleMemberTestData
     boolean bOOLEAN_3 ;
    if(listOriginalRoleMember !=null&& !CollectionUtil.isEmpty(listOriginalRoleMember)&& listOriginalRoleMember.size()>0 ){
          List<String> listString_3=new ArrayList<>();
  listString_3 = listOriginalRoleMember.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380688_1
  
    /*M1批量删身份人员测试[4862]   */
    
      bOOLEAN_3 = mOriginalRoleMemberService.batchDeleteOriginalRoleMemberTestData(listString_3);
      
      
      
           }
    
//步骤7: M1批量查询身份人员资料测试 - batchQueryOriginalRoleMemberInfoTestData
     List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo =new ArrayList<>();
    if(listOriginalRoleMember !=null&& !CollectionUtil.isEmpty(listOriginalRoleMember)&& listOriginalRoleMember.size()>0 ){
          BatchQueryOriginalRoleMemberInfoTestDataReq batchQueryOriginalRoleMemberInfoTestDataReq=new BatchQueryOriginalRoleMemberInfoTestDataReq();
  batchQueryOriginalRoleMemberInfoTestDataReq.setOriginalRoleMemberInfoTestDataList(listOriginalRoleMember.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:380691_1
  
    /*M1批量查询身份人员资料测试[4863]   */
    
      listOriginalRoleMemberInfo = mOriginalRoleMemberInfoService.batchQueryOriginalRoleMemberInfoTestData(batchQueryOriginalRoleMemberInfoTestDataReq);
      
      
      
           }
    
//步骤8: M1批量删身份人员资料测试 - batchDeleteOriginalRoleMemberInfoTestData
     boolean bOOLEAN_4 ;
    if(listOriginalRoleMemberInfo !=null&& !CollectionUtil.isEmpty(listOriginalRoleMemberInfo)&& listOriginalRoleMemberInfo.size()>0 ){
          List<String> listString_4=new ArrayList<>();
  listString_4 = listOriginalRoleMemberInfo.stream().map(item->item.getOriginalStafInfoId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380694_1
  
    /*M1批量删身份人员资料测试[4864]   */
    
      bOOLEAN_4 = mOriginalRoleMemberInfoService.batchDeleteOriginalRoleMemberInfoTestData(listString_4);
      
      
      
           }
    
//步骤9: M1批量查询角色人员测试 - batchQueryRoleMemberTestData
     List<RoleMember> listRoleMember =new ArrayList<>();
    BatchQueryRoleMemberTestDataReq batchQueryRoleMemberTestDataReq=new BatchQueryRoleMemberTestDataReq();
  if(reqDto!=null){
      batchQueryRoleMemberTestDataReq.setRoleMemberTestDataList(reqDto.getUserTestDataList());//list-field-assign//sourceId:380697_1
    }
  
    /*M1批量查询角色人员测试[4870]   */
    
      listRoleMember = mRoleMemberService.batchQueryRoleMemberTestData(batchQueryRoleMemberTestDataReq);
      
      
      
    
//步骤10: M1批量删角色人员测试 - batchDeleteRoleMemberTestData
     boolean bOOLEAN_5 ;
    if(listRoleMember !=null&& !CollectionUtil.isEmpty(listRoleMember)&& listRoleMember.size()>0 ){
          List<String> listString_5=new ArrayList<>();
  listString_5 = listRoleMember.stream().map(item->item.getRoleMemberId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380700_1
  
    /*M1批量删角色人员测试[4865]   */
    
      bOOLEAN_5 = mRoleMemberService.batchDeleteRoleMemberTestData(listString_5);
      
      
      
           }
    
//步骤11: M1批量查询就职记录测试 - batchQueryInductionRecordTestData
     List<InductionRecord> listInductionRecord =new ArrayList<>();
    BatchQueryInductionRecordTestDataReq batchQueryInductionRecordTestDataReq=new BatchQueryInductionRecordTestDataReq();
  if(reqDto!=null){
      batchQueryInductionRecordTestDataReq.setInductionRecordTestDataList(reqDto.getUserTestDataList());//list-field-assign//sourceId:380703_1
    }
  
    /*M1批量查询就职记录测试[4866]   */
    
      listInductionRecord = mInductionRecordService.batchQueryInductionRecordTestData(batchQueryInductionRecordTestDataReq);
      
      
      
    
//步骤12: M1批量删就职记录测试 - batchDeleteInductionRecordTestData
     boolean bOOLEAN_6 ;
    if(listInductionRecord !=null&& !CollectionUtil.isEmpty(listInductionRecord)&& listInductionRecord.size()>0 ){
          List<String> listString_6=new ArrayList<>();
  listString_6 = listInductionRecord.stream().map(item->item.getInductionRecordId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380706_1
  
    /*M1批量删就职记录测试[4867]   */
    
      bOOLEAN_6 = mInductionRecordService.batchDeleteInductionRecordTestData(listString_6);
      
      
      
           }
    
//步骤13: M1批量查询联盟用户测试 - batchQueryUsersUnionTestData
     List<UsersUnion> listUsersUnion =new ArrayList<>();
    BatchQueryUsersUnionTestDataReq batchQueryUsersUnionTestDataReq=new BatchQueryUsersUnionTestDataReq();
  if(reqDto!=null){
      batchQueryUsersUnionTestDataReq.setUsersUnionTestDataList(reqDto.getUserTestDataList());//list-field-assign//sourceId:380794_1
    }

    /*M1批量查询联盟用户测试[4886]   */

      listUsersUnion = mUsersUnionService.batchQueryUsersUnionTestData(batchQueryUsersUnionTestDataReq);




//步骤14: M1批量删联盟用户测试 - batchDeleteUsersUnionTestData
     boolean bOOLEAN_7 ;
    List<String> listString_7=new ArrayList<>();
  listString_7=listString_7;;//list-field-assign//sourceId:380797_1

    /*M1批量删联盟用户测试[4887]   */

      bOOLEAN_7 = mUsersUnionService.batchDeleteUsersUnionTestData(listString_7);




BatchDeleteUserTestDataRespDto retData = new BatchDeleteUserTestDataRespDto();
  
  

  
  
return retData;
  }
/**
   * D1批量删空间所有人员测试(公共)[4883]
   * gen by moon at 10/16/2022, 11:09:59 AM
   */
  @Trace(operationName = "D1批量删空间所有人员测试(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchDeleteSpaceAllMemberTestDataComRespDto batchDeleteSpaceAllMemberTestDataCom(BatchDeleteSpaceAllMemberTestDataComReqDto reqDto){
    
      
      //步骤0: M1查询空间成员测试列表 - queryMemberTestDataList
     List<SpaceMember> listSpaceMember =new ArrayList<>();
    SpaceMember spaceMember=new SpaceMember();
  if(reqDto!=null){
      spaceMember.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380764_1
    }
  
    /*M1查询空间成员测试列表[4884]   */
    Assert.isNull(spaceMember.getSpaceId(),"D1批量删空间所有人员测试(公共)-M1查询空间成员测试列表-创建于空间ID不能为空",false);
      listSpaceMember = mSpaceMemberService.queryMemberTestDataList(spaceMember);
      
      
      
    
//步骤1: M1批量删空间成员测试 - batchDeleteMemberTestData
     boolean bOOLEAN ;
    if(listSpaceMember !=null&& !CollectionUtil.isEmpty(listSpaceMember)&& listSpaceMember.size()>0 ){
          List<String> listString=new ArrayList<>();
  listString = listSpaceMember.stream().map(item->item.getMemberId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380766_1
  
    /*M1批量删空间成员测试[4860]   */
    
      bOOLEAN = mSpaceMemberService.batchDeleteMemberTestData(listString);
      
      
      
           }
    
//步骤2: M1批量查询个人账号测试 - batchQueryUserTestData
     List<Users> listUsers =new ArrayList<>();
    if(listSpaceMember !=null&& !CollectionUtil.isEmpty(listSpaceMember)&& listSpaceMember.size()>0 ){
          BatchQueryUserTestDataReq batchQueryUserTestDataReq=new BatchQueryUserTestDataReq();
  batchQueryUserTestDataReq.setUserTestDataList(listSpaceMember.stream().map(item->item.getUserId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:380782_1
  
    /*M1批量查询个人账号测试[4885]   */
    
      listUsers = mUsersService.batchQueryUserTestData(batchQueryUserTestDataReq);
      
      
      
           }
    
//步骤3: M1批量查询身份人员测试 - batchQueryOriginalRoleMemberTestData
     List<OriginalRoleMember> listOriginalRoleMember =new ArrayList<>();
    if(listUsers !=null&& !CollectionUtil.isEmpty(listUsers)&& listUsers.size()>0 ){
          BatchQueryOriginalRoleMemberTestDataReq batchQueryOriginalRoleMemberTestDataReq=new BatchQueryOriginalRoleMemberTestDataReq();
  batchQueryOriginalRoleMemberTestDataReq.setOriginalRoleMemberTestDataList(listUsers.stream().map(item->item.getUserId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:380767_1
if(reqDto!=null){
      batchQueryOriginalRoleMemberTestDataReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380785_1
    }
  
    /*M1批量查询身份人员测试[4861]   */
    Assert.isNull(batchQueryOriginalRoleMemberTestDataReq.getSpaceId(),"D1批量删空间所有人员测试(公共)-M1批量查询身份人员测试-创建于空间ID不能为空",false);
      listOriginalRoleMember = mOriginalRoleMemberService.batchQueryOriginalRoleMemberTestData(batchQueryOriginalRoleMemberTestDataReq);
      
      
      
           }
    
//步骤4: M1批量删身份人员测试 - batchDeleteOriginalRoleMemberTestData
     boolean bOOLEAN_1 ;
    if(listOriginalRoleMember !=null&& !CollectionUtil.isEmpty(listOriginalRoleMember)&& listOriginalRoleMember.size()>0 ){
          List<String> listString_1=new ArrayList<>();
  listString_1 = listOriginalRoleMember.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380769_1
  
    /*M1批量删身份人员测试[4862]   */
    
      bOOLEAN_1 = mOriginalRoleMemberService.batchDeleteOriginalRoleMemberTestData(listString_1);
      
      
      
           }
    
//步骤5: M1批量查询身份人员资料测试 - batchQueryOriginalRoleMemberInfoTestData
     List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo =new ArrayList<>();
    if(listOriginalRoleMember !=null&& !CollectionUtil.isEmpty(listOriginalRoleMember)&& listOriginalRoleMember.size()>0 ){
          BatchQueryOriginalRoleMemberInfoTestDataReq batchQueryOriginalRoleMemberInfoTestDataReq=new BatchQueryOriginalRoleMemberInfoTestDataReq();
  batchQueryOriginalRoleMemberInfoTestDataReq.setOriginalRoleMemberInfoTestDataList(listOriginalRoleMember.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:380770_1
  
    /*M1批量查询身份人员资料测试[4863]   */
    
      listOriginalRoleMemberInfo = mOriginalRoleMemberInfoService.batchQueryOriginalRoleMemberInfoTestData(batchQueryOriginalRoleMemberInfoTestDataReq);
      
      
      
           }
    
//步骤6: M1批量删身份人员资料测试 - batchDeleteOriginalRoleMemberInfoTestData
     boolean bOOLEAN_2 ;
    if(listOriginalRoleMemberInfo !=null&& !CollectionUtil.isEmpty(listOriginalRoleMemberInfo)&& listOriginalRoleMemberInfo.size()>0 ){
          List<String> listString_2=new ArrayList<>();
  listString_2 = listOriginalRoleMemberInfo.stream().map(item->item.getOriginalStafInfoId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380772_1
  
    /*M1批量删身份人员资料测试[4864]   */
    
      bOOLEAN_2 = mOriginalRoleMemberInfoService.batchDeleteOriginalRoleMemberInfoTestData(listString_2);
      
      
      
           }
    
//步骤7: M1批量查询角色人员测试 - batchQueryRoleMemberTestData
     List<RoleMember> listRoleMember =new ArrayList<>();
    if(listUsers !=null&& !CollectionUtil.isEmpty(listUsers)&& listUsers.size()>0 ){
          BatchQueryRoleMemberTestDataReq batchQueryRoleMemberTestDataReq=new BatchQueryRoleMemberTestDataReq();
  batchQueryRoleMemberTestDataReq.setRoleMemberTestDataList(listUsers.stream().map(item->item.getUserId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:380773_1
if(reqDto!=null){
      batchQueryRoleMemberTestDataReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380787_1
    }
  
    /*M1批量查询角色人员测试[4870]   */
    Assert.isNull(batchQueryRoleMemberTestDataReq.getSpaceId(),"D1批量删空间所有人员测试(公共)-M1批量查询角色人员测试-创建于空间ID不能为空",false);
      listRoleMember = mRoleMemberService.batchQueryRoleMemberTestData(batchQueryRoleMemberTestDataReq);
      
      
      
           }
    
//步骤8: M1批量删角色人员测试 - batchDeleteRoleMemberTestData
     boolean bOOLEAN_3 ;
    if(listRoleMember !=null&& !CollectionUtil.isEmpty(listRoleMember)&& listRoleMember.size()>0 ){
          List<String> listString_3=new ArrayList<>();
  listString_3 = listRoleMember.stream().map(item->item.getRoleMemberId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380775_1
  
    /*M1批量删角色人员测试[4865]   */
    
      bOOLEAN_3 = mRoleMemberService.batchDeleteRoleMemberTestData(listString_3);
      
      
      
           }
    
//步骤9: M1批量查询就职记录测试 - batchQueryInductionRecordTestData
     List<InductionRecord> listInductionRecord =new ArrayList<>();
    if(listUsers !=null&& !CollectionUtil.isEmpty(listUsers)&& listUsers.size()>0 ){
          BatchQueryInductionRecordTestDataReq batchQueryInductionRecordTestDataReq=new BatchQueryInductionRecordTestDataReq();
  batchQueryInductionRecordTestDataReq.setInductionRecordTestDataList(listUsers.stream().map(item->item.getUserId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:380776_1
if(reqDto!=null){
      batchQueryInductionRecordTestDataReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380789_1
    }
  
    /*M1批量查询就职记录测试[4866]   */
    Assert.isNull(batchQueryInductionRecordTestDataReq.getSpaceId(),"D1批量删空间所有人员测试(公共)-M1批量查询就职记录测试-创建于空间ID不能为空",false);
      listInductionRecord = mInductionRecordService.batchQueryInductionRecordTestData(batchQueryInductionRecordTestDataReq);
      
      
      
           }
    
//步骤10: M1批量删就职记录测试 - batchDeleteInductionRecordTestData
     boolean bOOLEAN_4 ;
    if(listInductionRecord !=null&& !CollectionUtil.isEmpty(listInductionRecord)&& listInductionRecord.size()>0 ){
          List<String> listString_4=new ArrayList<>();
  listString_4 = listInductionRecord.stream().map(item->item.getInductionRecordId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380778_1
  
    /*M1批量删就职记录测试[4867]   */
    
      bOOLEAN_4 = mInductionRecordService.batchDeleteInductionRecordTestData(listString_4);
      
      
      
           }
    
BatchDeleteSpaceAllMemberTestDataComRespDto retData = new BatchDeleteSpaceAllMemberTestDataComRespDto();
  
  

  
  
return retData;
  }
/**
   * D1删除空间测试[4872]
   * gen by moon at 10/16/2022, 11:10:16 AM
   */
  @Trace(operationName = "D1删除空间测试")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public DeleteSpaceTestDataRespDto deleteSpaceTestData(DeleteSpaceTestDataReqDto reqDto){
    
      
      //步骤0: M1删除空间测试 - deleteSpaceTestData
     boolean bOOLEAN ;
    String string=new String();
  if(reqDto!=null){
      string=reqDto.getSpaceId();;//SimpleFieldAssign//sourceId:380723_1
    }
  
    /*M1删除空间测试[4873]   */
    Assert.isNull(string,"D1删除空间测试-M1删除空间测试-空间ID不能为空",false);
      bOOLEAN = mSpaceService.deleteSpaceTestData(string);
      
      
      
    
//步骤1: M1批量查询组织测试 - batchQueryOrgTestData
     List<Organization> listOrganization =new ArrayList<>();
    Organization organization=new Organization();
  if(reqDto!=null){
      organization.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380732_1
    }
  
    /*M1批量查询组织测试[4874]   */
    Assert.isNull(organization.getSpaceId(),"D1删除空间测试-M1批量查询组织测试-创建于空间ID不能为空",false);
      listOrganization = mOrganizationService.batchQueryOrgTestData(organization);
      
      
      
    
//步骤2: M1批量删组织测试 - batchDeleteOrgTestData
     boolean bOOLEAN_1 ;
    if(listOrganization !=null&& !CollectionUtil.isEmpty(listOrganization)&& listOrganization.size()>0 ){
          List<String> listString=new ArrayList<>();
  listString = listOrganization.stream().map(item->item.getOrganizationId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380727_1
  
    /*M1批量删组织测试[4875]   */
    
      bOOLEAN_1 = mOrganizationService.batchDeleteOrgTestData(listString);
      
      
      
           }
    
//步骤3: M1查询联盟应用测试详情 - queryAppTestDataDetail
     UnionApp unionApp = null;
    UnionApp unionApp_1=new UnionApp();
  if(reqDto!=null){
      unionApp_1.setUniqueSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380728_1
    }
  
    /*M1查询联盟应用测试详情[4877]   */
    Assert.isNull(unionApp_1.getUniqueSpaceId(),"D1删除空间测试-M1查询联盟应用测试详情-管理的空间ID不能为空",false);
      unionApp = mUnionAppService.queryAppTestDataDetail(unionApp_1);
      
      
      
    
//步骤4: M1删除联盟应用测试 - deleteAppTestData
     boolean bOOLEAN_2 ;
    if(unionApp !=null){
          String string_1=new String();
  if(unionApp!=null){
      string_1=unionApp.getAppId();;//SimpleFieldAssign//sourceId:380730_1
    }
  
    /*M1删除联盟应用测试[4876]   */
    Assert.isNull(string_1,"D1删除空间测试-M1删除联盟应用测试-应用ID不能为空",false);
      bOOLEAN_2 = mUnionAppService.deleteAppTestData(string_1);
      
      
      
           }
    
//步骤5: M1批量查询组织的状态校验项测试 - batchQueryCheckItemStatListTestData
     List<StatusCheckItem> listStatusCheckItem =new ArrayList<>();
    if(listOrganization !=null&& !CollectionUtil.isEmpty(listOrganization)&& listOrganization.size()>0 ){
          BatchQueryCheckItemStatListTestDataReq batchQueryCheckItemStatListTestDataReq=new BatchQueryCheckItemStatListTestDataReq();
  batchQueryCheckItemStatListTestDataReq.setCheckItemStatListTestDataList(listOrganization.stream().map(item->item.getOrganizationId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:380742_1
batchQueryCheckItemStatListTestDataReq.setObjectTypeCode("ORG_CHECK");//sourceId:380743_1
  
    /*M1批量查询组织的状态校验项测试[4878]   */
    Assert.isNull(batchQueryCheckItemStatListTestDataReq.getObjectTypeCode(),"D1删除空间测试-M1批量查询组织的状态校验项测试-内容对象类型编码不能为空",false);
      listStatusCheckItem = mStatusCheckItemService.batchQueryCheckItemStatListTestData(batchQueryCheckItemStatListTestDataReq);
      
      
      
           }
    
//步骤6: M1批量删组织的状态校验项测试 - batchDeleteCheckItemStatListTestData
     boolean bOOLEAN_3 ;
    if(listStatusCheckItem !=null&& !CollectionUtil.isEmpty(listStatusCheckItem)&& listStatusCheckItem.size()>0 ){
          List<String> listString_1=new ArrayList<>();
  listString_1 = listStatusCheckItem.stream().map(item->item.getStatusCheckItemId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380745_1
  
    /*M1批量删组织的状态校验项测试[4879]   */
    
      bOOLEAN_3 = mStatusCheckItemService.batchDeleteCheckItemStatListTestData(listString_1);
      
      
      
           }
    
//步骤7: M1查询空间下权限分配列表 - queryPrivacyDistributionTestDataList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    PrivacyDistribution privacyDistribution=new PrivacyDistribution();
  if(reqDto!=null){
      privacyDistribution.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380746_1
    }
  
    /*M1查询空间下权限分配列表[4880]   */
    Assert.isNull(privacyDistribution.getSpaceId(),"D1删除空间测试-M1查询空间下权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryPrivacyDistributionTestDataList(privacyDistribution);
      
      
      
    
//步骤8: M1批量删空间下权限分配 - batchDeletePrivacyDistributionTestData
     boolean bOOLEAN_4 ;
    if(listPrivacyDistribution !=null&& !CollectionUtil.isEmpty(listPrivacyDistribution)&& listPrivacyDistribution.size()>0 ){
          List<String> listString_2=new ArrayList<>();
  listString_2 = listPrivacyDistribution.stream().map(item->item.getPrivacyDistributionId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380748_1
  
    /*M1批量删空间下权限分配[4881]   */
    
      bOOLEAN_4 = mPrivacyDistributionService.batchDeletePrivacyDistributionTestData(listString_2);
      
      
      
           }
    
//步骤9: D1删除组织架构相关测试(公共) - deleteSpaceOrgDataCom
     DeleteSpaceOrgDataComRespDto deleteSpaceOrgDataComRespDto = null;
    DeleteSpaceOrgDataComReqDto deleteSpaceOrgDataComReqDto=new DeleteSpaceOrgDataComReqDto();
  if(reqDto!=null){
      deleteSpaceOrgDataComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381118_1
    }

    /*D1删除组织架构相关测试(公共)[4906]   */
    Assert.isNull(deleteSpaceOrgDataComReqDto.getSpaceId(),"D1删除空间测试-D1删除组织架构相关测试(公共)-创建于空间ID不能为空",false);
      deleteSpaceOrgDataComRespDto = deleteSpaceOrgDataCom(deleteSpaceOrgDataComReqDto);




//步骤10: D1批量删空间所有人员测试(公共) - batchDeleteSpaceAllMemberTestDataCom
     BatchDeleteSpaceAllMemberTestDataComRespDto batchDeleteSpaceAllMemberTestDataComRespDto = null;
    BatchDeleteSpaceAllMemberTestDataComReqDto batchDeleteSpaceAllMemberTestDataComReqDto=new BatchDeleteSpaceAllMemberTestDataComReqDto();
  if(reqDto!=null){
      batchDeleteSpaceAllMemberTestDataComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380790_1
    }
  
    /*D1批量删空间所有人员测试(公共)[4883]   */
    Assert.isNull(batchDeleteSpaceAllMemberTestDataComReqDto.getSpaceId(),"D1删除空间测试-D1批量删空间所有人员测试(公共)-创建于空间ID不能为空",false);
      batchDeleteSpaceAllMemberTestDataComRespDto = batchDeleteSpaceAllMemberTestDataCom(batchDeleteSpaceAllMemberTestDataComReqDto);
      
      
      
    
//步骤11: D2-3删除空间下方案开通记录测试(公共) - deleteSpaceSchemeRecordEtcCom
     DeleteSpaceSchemeRecordEtcComRespDto deleteSpaceSchemeRecordEtcComRespDto = null;
    DeleteSpaceSchemeRecordEtcComReqDto deleteSpaceSchemeRecordEtcComReqDto=new DeleteSpaceSchemeRecordEtcComReqDto();
  if(reqDto!=null){
      deleteSpaceSchemeRecordEtcComReqDto.setTenantSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380826_1
    }

    /*D2-3删除空间下方案开通记录测试(公共)[4888]   */
    Assert.isNull(deleteSpaceSchemeRecordEtcComReqDto.getTenantSpaceId(),"D1删除空间测试-D2-3删除空间下方案开通记录测试(公共)-租户空间ID不能为空",false);
      deleteSpaceSchemeRecordEtcComRespDto = fwCompSystemTestDomainClient.deleteSpaceSchemeRecordEtcCom(deleteSpaceSchemeRecordEtcComReqDto).getData();




DeleteSpaceTestDataRespDto retData = new DeleteSpaceTestDataRespDto();
  
  

  
  
return retData;
  }
/**
   * D1删除组织架构相关测试(公共)[4906]
   * gen by moon at 10/16/2022, 11:09:58 AM
   */
  @Trace(operationName = "D1删除组织架构相关测试(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public DeleteSpaceOrgDataComRespDto deleteSpaceOrgDataCom(DeleteSpaceOrgDataComReqDto reqDto){


      //步骤0: M1查询编制账户测试列表 - queryStaffingAccountTestDataList
     List<StaffingAccount> listStaffingAccount =new ArrayList<>();
    StaffingAccount staffingAccount=new StaffingAccount();
  if(reqDto!=null){
      staffingAccount.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380926_1
    }

    /*M1查询编制账户测试列表[4909]   */
    Assert.isNull(staffingAccount.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询编制账户测试列表-创建于空间ID不能为空",false);
      listStaffingAccount = mStaffingAccountService.queryStaffingAccountTestDataList(staffingAccount);




//步骤1: M1批量删编制账户测试 - batchDeleteStaffingAccountTestData
     boolean bOOLEAN ;
    if(listStaffingAccount !=null&& !CollectionUtil.isEmpty(listStaffingAccount)&& listStaffingAccount.size()>0 ){
          List<String> listString=new ArrayList<>();
  listString = listStaffingAccount.stream().map(item->item.getStaffingAccountId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380929_1

    /*M1批量删编制账户测试[4911]   */

      bOOLEAN = mStaffingAccountService.batchDeleteStaffingAccountTestData(listString);



           }

//步骤2: M1查询编制测试列表 - queryStaffingTestDataList
     List<Staffing> listStaffing =new ArrayList<>();
    Staffing staffing=new Staffing();
  if(reqDto!=null){
      staffing.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380932_1
    }

    /*M1查询编制测试列表[4913]   */
    Assert.isNull(staffing.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询编制测试列表-创建于空间ID不能为空",false);
      listStaffing = mStaffingService.queryStaffingTestDataList(staffing);




//步骤3: M1批量删编制测试 - batchDeleteStaffingTestData
     boolean bOOLEAN_1 ;
    if(listStaffing !=null&& !CollectionUtil.isEmpty(listStaffing)&& listStaffing.size()>0 ){
          List<String> listString_1=new ArrayList<>();
  listString_1 = listStaffing.stream().map(item->item.getStaffingId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380935_1

    /*M1批量删编制测试[4916]   */

      bOOLEAN_1 = mStaffingService.batchDeleteStaffingTestData(listString_1);



           }

//步骤4: M1查询组织架构类型字典测试列表 - queryTypeDictionaryTestDataList
     List<TypeDictionary> listTypeDictionary =new ArrayList<>();
    TypeDictionary typeDictionary=new TypeDictionary();
  if(reqDto!=null){
      typeDictionary.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381041_1
    }

    /*M1查询组织架构类型字典测试列表[4895]   */
    Assert.isNull(typeDictionary.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询组织架构类型字典测试列表-创建于空间ID不能为空",false);
      listTypeDictionary = mTypeDictionaryService.queryTypeDictionaryTestDataList(typeDictionary);




//步骤5: M1批量删组织架构类型字典测试 - batchDeleteTypeDictionaryTestData
     boolean bOOLEAN_2 ;
    if(listTypeDictionary !=null&& !CollectionUtil.isEmpty(listTypeDictionary)&& listTypeDictionary.size()>0 ){
          List<String> listString_2=new ArrayList<>();
  listString_2 = listTypeDictionary.stream().map(item->item.getTypeDictionaryId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381047_1

    /*M1批量删组织架构类型字典测试[4896]   */

      bOOLEAN_2 = mTypeDictionaryService.batchDeleteTypeDictionaryTestData(listString_2);



           }

//步骤6: M1查询部门测试列表 - queryDeptTestDataList
     List<Dept> listDept =new ArrayList<>();
      QueryDeptTestDataListReq dept=new QueryDeptTestDataListReq();
  if(reqDto!=null){
      dept.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381051_1
    }

    /*M1查询部门测试列表[4897]   */
    Assert.isNull(dept.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询部门测试列表-创建于空间ID不能为空",false);
      listDept = mDeptService.queryDeptTestDataList(dept);




//步骤7: M1批量删部门测试 - batchDeleteDeptTestData
     boolean bOOLEAN_3 ;
    if(listDept !=null&& !CollectionUtil.isEmpty(listDept)&& listDept.size()>0 ){
          List<String> listString_3=new ArrayList<>();
  listString_3 = listDept.stream().map(item->item.getDeptId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381055_1

    /*M1批量删部门测试[4898]   */

      bOOLEAN_3 = mDeptService.batchDeleteDeptTestData(listString_3);



           }

//步骤8: M1查询组织部门职务关系测试列表 - queryPositionRelationshipTestDataList
     List<DeptPositionRelationship> listDeptPositionRelationship =new ArrayList<>();
    DeptPositionRelationship deptPositionRelationship=new DeptPositionRelationship();
  if(reqDto!=null){
      deptPositionRelationship.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381059_1
    }

    /*M1查询组织部门职务关系测试列表[4899]   */
    Assert.isNull(deptPositionRelationship.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询组织部门职务关系测试列表-创建于空间ID不能为空",false);
      listDeptPositionRelationship = mDeptPositionRelationshipService.queryPositionRelationshipTestDataList(deptPositionRelationship);




//步骤9: M1批量删组织部门职务关系测试 - batchDeletePositionRelationshipTestData
     boolean bOOLEAN_4 ;
    if(listDeptPositionRelationship !=null&& !CollectionUtil.isEmpty(listDeptPositionRelationship)&& listDeptPositionRelationship.size()>0 ){
          List<String> listString_4=new ArrayList<>();
  listString_4 = listDeptPositionRelationship.stream().map(item->item.getOrgPositionRelationshipId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381062_1

    /*M1批量删组织部门职务关系测试[4900]   */

      bOOLEAN_4 = mDeptPositionRelationshipService.batchDeletePositionRelationshipTestData(listString_4);



           }

//步骤10: M1查询目标职责明细测试列表 - queryDutyTargetDetailTestDataList
     List<DutyTargetDetail> listDutyTargetDetail =new ArrayList<>();
    DutyTargetDetail dutyTargetDetail=new DutyTargetDetail();
  if(reqDto!=null){
      dutyTargetDetail.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381070_1
    }

    /*M1查询目标职责明细测试列表[4901]   */
    Assert.isNull(dutyTargetDetail.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询目标职责明细测试列表-创建于空间ID不能为空",false);
      listDutyTargetDetail = mDutyTargetDetailService.queryDutyTargetDetailTestDataList(dutyTargetDetail);




//步骤11: M1批量删目标职责明细测试 - batchDeleteDutyTargetDetailTestData
     boolean bOOLEAN_5 ;
    if(listDutyTargetDetail !=null&& !CollectionUtil.isEmpty(listDutyTargetDetail)&& listDutyTargetDetail.size()>0 ){
          List<String> listString_5=new ArrayList<>();
  listString_5 = listDutyTargetDetail.stream().map(item->item.getDutyTargetDetailId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381077_1

    /*M1批量删目标职责明细测试[4902]   */

      bOOLEAN_5 = mDutyTargetDetailService.batchDeleteDutyTargetDetailTestData(listString_5);



           }

//步骤12: M1查询职位测试列表 - queryPostTestDataList
     List<Post> listPost =new ArrayList<>();
    Post post=new Post();
  if(reqDto!=null){
      post.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381080_1
    }

    /*M1查询职位测试列表[4903]   */
    Assert.isNull(post.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询职位测试列表-创建于空间ID不能为空",false);
      listPost = mPostService.queryPostTestDataList(post);




//步骤13: M1批量删职位测试 - batchDeletePostTestData
     boolean bOOLEAN_6 ;
    if(listPost !=null&& !CollectionUtil.isEmpty(listPost)&& listPost.size()>0 ){
          List<String> listString_6=new ArrayList<>();
  listString_6 = listPost.stream().map(item->item.getPostId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381083_1

    /*M1批量删职位测试[4904]   */

      bOOLEAN_6 = mPostService.batchDeletePostTestData(listString_6);



           }

//步骤14: M1查询岗位测试列表 - queryStationTestDataList
     List<Station> listStation =new ArrayList<>();
    Station station=new Station();
  if(reqDto!=null){
      station.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381087_1
    }

    /*M1查询岗位测试列表[4905]   */
    Assert.isNull(station.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询岗位测试列表-创建于空间ID不能为空",false);
      listStation = mStationService.queryStationTestDataList(station);




//步骤15: M1批量删岗位测试 - batchDeleteStationTestData
     boolean bOOLEAN_7 ;
    if(listStation !=null&& !CollectionUtil.isEmpty(listStation)&& listStation.size()>0 ){
          List<String> listString_7=new ArrayList<>();
  listString_7 = listStation.stream().map(item->item.getStationId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381092_1

    /*M1批量删岗位测试[4907]   */

      bOOLEAN_7 = mStationService.batchDeleteStationTestData(listString_7);



           }

//步骤16: M1查询岗位类型测试列表 - queryStationTypeTestDataList
     List<StationType> listStationType =new ArrayList<>();
    StationType stationType=new StationType();
  if(reqDto!=null){
      stationType.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381098_1
    }

    /*M1查询岗位类型测试列表[4915]   */
    Assert.isNull(stationType.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询岗位类型测试列表-创建于空间ID不能为空",false);
      listStationType = mStationTypeService.queryStationTypeTestDataList(stationType);




//步骤17: M1批量删岗位类型测试 - batchDeleteStationTypeTestData
     boolean bOOLEAN_8 ;
    if(listStationType !=null&& !CollectionUtil.isEmpty(listStationType)&& listStationType.size()>0 ){
          List<String> listString_8=new ArrayList<>();
  listString_8 = listStationType.stream().map(item->item.getStationTypeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381104_1

    /*M1批量删岗位类型测试[4917]   */

      bOOLEAN_8 = mStationTypeService.batchDeleteStationTypeTestData(listString_8);



           }

//步骤18: M1查询职务名称测试列表 - queryPositionIdNameTestDataList
     List<PositionIdName> listPositionIdName =new ArrayList<>();
    PositionIdName positionIdName=new PositionIdName();
  if(reqDto!=null){
      positionIdName.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381109_1
    }

    /*M1查询职务名称测试列表[4908]   */
    Assert.isNull(positionIdName.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询职务名称测试列表-创建于空间ID不能为空",false);
      listPositionIdName = mPositionIdNameService.queryPositionIdNameTestDataList(positionIdName);




//步骤19: M1批量删职务名称测试 - batchDeletePositionIdNameTestData
     boolean bOOLEAN_9 ;
    if(listPositionIdName !=null&& !CollectionUtil.isEmpty(listPositionIdName)&& listPositionIdName.size()>0 ){
          List<String> listString_9=new ArrayList<>();
  listString_9 = listPositionIdName.stream().map(item->item.getPositionIdNameId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381114_1

    /*M1批量删职务名称测试[4910]   */

      bOOLEAN_9 = mPositionIdNameService.batchDeletePositionIdNameTestData(listString_9);



           }

//步骤20: M1查询职务测试列表 - queryPositionTestDataList
     List<Position> listPosition =new ArrayList<>();
    Position position=new Position();
  if(reqDto!=null){
      position.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381111_1
    }

    /*M1查询职务测试列表[4912]   */
    Assert.isNull(position.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询职务测试列表-创建于空间ID不能为空",false);
      listPosition = mPositionService.queryPositionTestDataList(position);




//步骤21: M1批量删职务测试 - batchDeletePositionTestData
     boolean bOOLEAN_10 ;
    if(listPosition !=null&& !CollectionUtil.isEmpty(listPosition)&& listPosition.size()>0 ){
          List<String> listString_10=new ArrayList<>();
  listString_10 = listPosition.stream().map(item->item.getPositionId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381116_1

    /*M1批量删职务测试[4914]   */

      bOOLEAN_10 = mPositionService.batchDeletePositionTestData(listString_10);



           }

//步骤22: M1查询职务级别测试列表 - queryPositionGradeTestDataList
     List<PositionGrade> listPositionGrade =new ArrayList<>();
    PositionGrade positionGrade=new PositionGrade();
  if(reqDto!=null){
      positionGrade.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:381088_1
    }

    /*M1查询职务级别测试列表[4920]   */
    Assert.isNull(positionGrade.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询职务级别测试列表-创建于空间ID不能为空",false);
      listPositionGrade = mPositionGradeService.queryPositionGradeTestDataList(positionGrade);




//步骤23: M1批量删职务级别测试 - batchDeletePositionGradeTestData
     boolean bOOLEAN_11 ;
    if(listPositionGrade !=null&& !CollectionUtil.isEmpty(listPositionGrade)&& listPositionGrade.size()>0 ){
          List<String> listString_11=new ArrayList<>();
  listString_11 = listPositionGrade.stream().map(item->item.getPositionGradeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:381095_1

    /*M1批量删职务级别测试[4922]   */

      bOOLEAN_11 = mPositionGradeService.batchDeletePositionGradeTestData(listString_11);



           }

//步骤24: M1查询等级范围测试列表 - queryGradeScopeTestDataList
     List<GradeScope> listGradeScope =new ArrayList<>();
    GradeScope gradeScope=new GradeScope();
  if(reqDto!=null){
      gradeScope.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:380938_1
    }

    /*M1查询等级范围测试列表[4918]   */
    Assert.isNull(gradeScope.getSpaceId(),"D1删除组织架构相关测试(公共)-M1查询等级范围测试列表-创建于空间ID不能为空",false);
      listGradeScope = mGradeScopeService.queryGradeScopeTestDataList(gradeScope);




//步骤25: M1批量删等级范围测试 - batchDeleteGradeScopeTestData
     boolean bOOLEAN_12 ;
    if(listGradeScope !=null&& !CollectionUtil.isEmpty(listGradeScope)&& listGradeScope.size()>0 ){
          List<String> listString_12=new ArrayList<>();
  listString_12 = listGradeScope.stream().map(item->item.getGradeScopeId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:380978_1

    /*M1批量删等级范围测试[4919]   */

      bOOLEAN_12 = mGradeScopeService.batchDeleteGradeScopeTestData(listString_12);



           }

DeleteSpaceOrgDataComRespDto retData = new DeleteSpaceOrgDataComRespDto();





return retData;
  }
/**
   * D1查询部门测试列表(公共)[5954]
   * gen by moon at 2/19/2023, 4:27:11 PM
   */
  @Trace(operationName = "D1查询部门测试列表(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryDeptTestDataListComRespDto queryDeptTestDataListCom(QueryDeptTestDataListComReqDto reqDto){


      List<Dept> listDept_1 =new ArrayList<>();
//步骤0: M1查询部门测试列表 - queryDeptTestDataList
     List<Dept> listDept =new ArrayList<>();
    QueryDeptTestDataListReq queryDeptTestDataListReq=new QueryDeptTestDataListReq();
  if(reqDto!=null){
      queryDeptTestDataListReq.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:690007_1
queryDeptTestDataListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:690004_1
    }

    /*M1查询部门测试列表[4897]   */
    Assert.isNull(queryDeptTestDataListReq.getSpaceId(),"D1查询部门测试列表(公共)-M1查询部门测试列表-创建于空间ID不能为空",false);
      listDept = mDeptService.queryDeptTestDataList(queryDeptTestDataListReq);


      listDept_1 = listDept;

QueryDeptTestDataListComRespDto retData = new QueryDeptTestDataListComRespDto();
  retData.setDeptList(listDept_1.stream().map(item->item.getDeptId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:690010_1




return retData;
  }

    //
}
